<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <script src="./vue.js"></script>
    <title></title>
  </head>
  <body>
      <div id="root">
          <input v-model:value="inputValue" />
          <button @click="handleClick">提交</button>
          <ul>
            <li v-for="(item, index) of list" :key="index">{{item}}</li>
          </ul>
      </div>
      <script>
          new Vue({
              el: '#root',
              data: {
                inputValue: '',
                list: []
              },
              methods: {
                handleClick: function() {
                  this.$data.list.push(this.$data.inputValue);
                  this.$data.inputValue = ''
                }
              }
          })
      </script>
  </body>
</html>
